<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>关闭套接字资源</title>
 </head>
 <body class="docs"><div id="layout">
  <div id="layout-content"><div id="function.socket-close" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">socket_close</h1>
  <p class="verinfo">(PHP 4 &gt;= 4.1.0, PHP 5, PHP 7)</p><p class="refpurpose"><span class="refname">socket_close</span> &mdash; <span class="dc-title">关闭套接字资源</span></p>

 </div>
 
 <div class="refsect1 description" id="refsect1-function.socket-close-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>socket_close</strong></span>
    ( <span class="methodparam"><span class="type">resource</span> <code class="parameter">$socket</code></span>
   ) : <span class="type"><span class="type void">void</span></span></div>

  <p class="para rdfs-comment">
   <span class="function"><strong>socket_close()</strong></span> 会关闭掉给定的 <code class="parameter">socket</code> 资源。
   这个函数只针对套接字资源有效，不能用在其他类型的资源类型上。
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.socket-close-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>

    
     <dt>
<code class="parameter">socket</code></dt>

     <dd>

       <p class="para">
        由 <span class="function"><a href="socket_create.html" class="function">socket_create()</a></span>
        或者是 <span class="function"><a href="socket_accept.html" class="function">socket_accept()</a></span> 创建的有效的套接字资源。
       </p>
     </dd>

    
   </dl>

  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.socket-close-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   没有返回值。
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.socket-close-seealso">
  <h3 class="title">参见</h3>
  <p class="para">
   <ul class="simplelist">
    <li class="member"><span class="function"><a href="socket_bind.html" class="function" rel="rdfs-seeAlso">socket_bind()</a> - 给套接字绑定名字</span></li>
    <li class="member"><span class="function"><a href="socket_listen.html" class="function" rel="rdfs-seeAlso">socket_listen()</a> - Listens for a connection on a socket</span></li>
    <li class="member"><span class="function"><a href="socket_create.html" class="function" rel="rdfs-seeAlso">socket_create()</a> - 创建一个套接字（通讯节点）</span></li>
    <li class="member"><span class="function"><a href="socket_strerror.html" class="function" rel="rdfs-seeAlso">socket_strerror()</a> - Return a string describing a socket error</span></li>
   </ul>
  </p>
 </div>


</div></div></div></body></html>